<template>
    <div id="box">
        1
    </div>
</template>

<script>
    import $ from "jquery"
    export default {
        name: "AliPay",
        data() {
            return {
                // 支付表单
                aliPayForm: {
                    // 订单ID
                    "orderId": this.$route.params.orderId,
                    // 支付金额
                    "money": this.$route.params.money,
                    // 结算ID
                    "payoffId": this.$route.params.payoffId
                }

            }
        },
        mounted() {
            this.getPaymentPage();
        },
        methods: {
            // 获取支付页面
            getPaymentPage() {
                let that = this;
                $.ajax({
                    url: IP_ADDR + "payment/getPayPage",
                    headers: {
                        "Access-Token": sessionStorage.getItem(ACCESS_TOKEN)
                    },
                    data: that.aliPayForm,
                    success(r) {
                        $("#box").html(r.res);
                    },
                    error(r) {
                        console.log(r);
                    }
                });
            }
        }
    }
</script>

<style scoped>

</style>